#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# @Time    : 2021/11/29 12:24
# @Author  : tianqunhui
# @contact : tqunhui@qq.com
# @File    : prime_number.py
# @Software: PyCharm


def get_prime_number(n):
    """
    :param n:  0~n以内的质数
    :return: prime_n_list
    """
    prime_n_list = []
    if n <= 1:
        return prime_n_list

    prime_n_list.append(2)
    if n == 2:
        return prime_n_list

    for i in range(3, n+1):
        is_prime = True
        for j in range(2, int(i/2)):
            if i % j == 0:
                is_prime = False
                break
        if is_prime:
            prime_n_list.append(i)


    return prime_n_list


re = get_prime_number(100)
print(re)